#include "MyStrUtil.h"
#include <sstream>

void myReadLine(std::istream& in, std::string& buffer) {    
    getline(in, buffer);
    std::string::size_type pos;
    
    pos = buffer.find_last_of('\n');
    if (pos != std::string::npos) {
        buffer.erase(pos, 1);
    }
    
    pos = buffer.find_last_of('\r');
    if (pos != std::string::npos) {
        buffer.erase(pos, 1);
    }
}

template <typename T>
string myNtoStr(T convertMe)
{
    std::ostringstream o;
    o << convertMe;
    return o.str();
}

template string myNtoStr<int>(int convertMe);
template string myNtoStr<double>(double convertMe);
